// 行政区域管理
import axios from "@/request/axios";

// 新增
export function areaAdd(params: any) {
  return axios({
    url: "/system/systemArea/add",
    method: "post",
    data: params,
  });
}

// 删除
export function areaDel(orgIds: any) {
  return axios({
    url: "/system/systemArea/del",
    method: "post",
    data: orgIds,
  });
}

// 获取详情
export function getAreaById(id: any) {
  return axios({
    url: "/system/systemArea/detail",
    method:"POST",
    data: { id }
  });
}

// 修改
export function areaEdit(params: any) {
  return axios({
    url: "/system/systemArea/edit",
    method: "post",
    data: params,
  });
}

// 获取机构树
export function getAreaTree(params: any) {
  return axios({
    url: "/system/systemArea/tree",
    method: "post",
    data: params,
  });
}

// 机构列表(分页)
export function areaQuery(params: any) {
  return axios({
    url: "/system/systemArea/query",
    method: "post",
    data: params,
  });
}
